package com.liangdemo.web.model;


import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import java.util.Date;

@Entity
@Data
@Table(name = "user")
public class User {
    /**
     * 用户id
     */

    @Id
    @Column(name = "id")
    @Excel(name = "用户id", width = 10)
    private Long id;
    /**
     * 用户名称
     */
    @Excel(name = "用户名称", width = 10)
    private String userName;
    /**
     * 用户状态
     */
    @Excel(name = "用户状态", width = 10,type = 1)
    private String status;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 10, exportFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 修改时间
     */
    @Excel(name = "修改时间", width = 10, exportFormat = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore//用来跳过该字段
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
